package com.jshop.admin.sys.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jshop.admin.sys.entity.SysMenuEntity;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * 菜单管理
 *
 */
@Component
public interface SysMenuDao extends BaseMapper<SysMenuEntity> {

    /**
     * 根据父菜单，查询子菜单
     *
     * @param parentId 父菜单ID
     */
    List<SysMenuEntity> queryListParentId(Long parentId);

    /**
     * 获取不包含按钮的菜单列表
     */
    List<SysMenuEntity> queryNotButtonList();

    /**
     * 查询用户的权限列表
     */
    List<SysMenuEntity> queryUserList(Integer userId);

    List<String> selectAllPerms();

    List<SysMenuEntity> queryListParentIdAndMerchant(Long parentId);

    List<SysMenuEntity> queryList(Map<String, Object> map);

    int queryTotal(Map<String, Object> map);

    int mysave(SysMenuEntity sysMenuEntity);

    int myupdate(SysMenuEntity sysMenuEntity);

    int deleteBatch(Object[] id);

    SysMenuEntity queryObject(Object id);
}
